﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dziennik WWW</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    <div class="container" style="margin-top: 40px;">
        <div class="navbar navbar-default">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Dziennik WWW</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    @if (User.IsInRole("Wykładowca"))
                    {
                        <li>@Html.ActionLink("Oceny", "List", "Grades")</li>
                        <li>@Html.RouteLink("Formy zaliczeń", "creditingFormList")</li>
                        <li>@Html.RouteLink("Wykładowcy", "teachersList")</li>
                        <li>@Html.RouteLink("Studenci", "studentsList")</li>
                        <li>@Html.RouteLink("Przedmioty", "subjectsList")</li>
                    }

                    @if (User.IsInRole("Administrator"))
                    {
                        <li>@Html.RouteLink("Wykładowcy", "teachersList")</li>
                        <li>@Html.RouteLink("Studenci", "studentsList")</li>
                        <li>@Html.RouteLink("Przedmioty", "subjectsList")</li>
                        <li>@Html.ActionLink("Grupy", "List", "Groups")</li>
                    }

                    @if (User.IsInRole("Student"))
                    {
                        <li>@Html.RouteLink("Oceny", "MyGrades")</li>
                        <li>@Html.RouteLink("Wykładowcy", "teachersList")</li>
                        <li>@Html.RouteLink("Przedmioty", "MySubjects")</li>
                    }
                </ul>

                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <span class="glyphicon glyphicon-user" style="float: left;margin-top: 16px;"></span>
                        @Html.RouteLink("Profil", "ownProfile")
                    </li>
                    <li class="divider" />
                    <li>
                        <span class="glyphicon glyphicon-off" style="float: left;margin-top: 16px;"></span>
                        @Html.ActionLink("Wyloguj", "Logout", "Account")
                    </li>
                </ul>
            </div>
        </div>
        @if (TempData["Msg"] != null)
        {
            if (TempData["Status"] == "success")
            {
                <div class="alert alert-success">
                    <a class="close">x</a>
                    <p class="status">@TempData["Msg"]</p>
                </div>
            }
            if (TempData["Status"] == "invalid")
            {
                <div class="alert alert-danger">
                    <a class="close">x</a>
                    <p class="status">@TempData["Msg"]</p>
                </div>
            }
        }

        @RenderBody()

    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @Scripts.Render("~/bundles/alerts")
    @Scripts.Render("~/bundles/chosen")
    @Scripts.Render("~/bundles/select")
    @Scripts.Render("~/bundles/cascades")
    <script type="text/javascript">
        $(document).ready(function () {
            $('.chzn-select').select2({});
        });
    </script>
    @RenderSection("scripts", required: false)
</body>
</html>
